/*
 * JsonCast.cpp
 *
 *  Created on: 2017年3月6日
 *      Author: chuanjiang.zh
 */

#include "JsonCast.h"
#include "json/writer.h"
#include "TFileUtil.h"
#include "TStringCast.h"
#include <time.h>
#include "TSafeStr.h"




JsonCast::JsonCast()
{
}

JsonCast::~JsonCast()
{
}

void JsonCast::toJson(const db::Device& obj, Json::Value& value)
{
    value["id"] = obj.id;
    value["name"] = obj.name;
    value["type"] = obj.type;
    value["tag"] = obj.tag;
    value["memo"] = obj.memo;
    value["ip"] = obj.ip;
    value["mac"] = obj.mac;
    value["netmask"] = obj.netmask;
    value["broadcast"] = obj.broadcast;
}
